<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改【 出差】')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-project-edit" th:object="${project}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="projectDate" th:value="${#dates.format(project.projectDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">时段：</label>
                <div class="col-sm-8">
                    <input name="projectTime" th:field="*{projectTime}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">拜访单位：</label>
                <div class="col-sm-8">
                    <input name="visitUnit" th:field="*{visitUnit}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">拜访任务：</label>
                <div class="col-sm-8">
                    <input name="visitDept" th:field="*{visitDept}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">拜访任务：</label>
                <div class="col-sm-8">
                    <input name="visitPeople" th:field="*{visitPeople}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">拜访目的：</label>
                <div class="col-sm-8">
                    <textarea name="visitTarget" class="form-control" required>[[*{visitTarget}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">出差人员：</label>
                <div class="col-sm-8">
                    <input name="fromMan" th:field="*{fromMan}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">交通工具：</label>
                <div class="col-sm-8">
                    <input name="transportation" th:field="*{transportation}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">部门领导：</label>
                <div class="col-sm-8">
                    <input name="deptLeader" th:field="*{deptLeader}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">部门领导评语：</label>
                <div class="col-sm-8">
                    <textarea name="deptLeaderComment" class="form-control">[[*{deptLeaderComment}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">部门领导审批(结果)：</label>
                <div class="col-sm-8">
                    <input name="secondLeader" th:field="*{secondLeader}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">总经理：</label>
                <div class="col-sm-8">
                    <input name="finance" th:field="*{finance}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">总经理审批结果：</label>
                <div class="col-sm-8">
                    <input name="firstLeader" th:field="*{firstLeader}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">总经理评语：</label>
                <div class="col-sm-8">
                    <textarea name="firstLeaderComment" class="form-control">[[*{firstLeaderComment}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">申请时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="creatTime" th:value="${#dates.format(project.creatTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/project";
        $("#form-project-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-project-edit').serialize());
            }
        }

        $("input[name='projectDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='creatTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>